package com.nd.android.musicboxlibrary.util.fastDateUtil;

import java.util.Calendar;

/**
 * <p>
 * Inner class defining a rule.
 * </p>
 */
public interface Rule {
    /**
     * Returns the estimated lentgh of the result.
     * 
     * @return the estimated length
     */
    int estimateLength();

    /**
     * Appends the value of the specified calendar to the output buffer based on the rule
     * implementation.
     * 
     * @param buffer
     *            the output buffer
     * @param calendar
     *            calendar to be appended
     */
    void appendTo(StringBuffer buffer, Calendar calendar);
}
